// WindowComponents.java by Matt Fritz
// June 3, 2010
// Handles the internal "Components" window

package customWindows;

import javax.swing.JInternalFrame;

public class WindowComponents extends JInternalFrame
{
	private String defaultTitleText = "Components";
	
	public WindowComponents()
	{
		setDefaultProperties(defaultTitleText);
	}
	
	public WindowComponents(String titleText)
	{
		setDefaultProperties(titleText);
	}
	
	// set the default window properties
	private void setDefaultProperties(String titleText)
	{
		setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE); // hide the window when it's closed
		setMaximizable(false); // can't be maximized
		setClosable(true); // can be closed
		setIconifiable(true); // can be minimized (iconified)
		setTitle(titleText);
		setBounds(0,0,200,700);
		setVisible(true);
	}
}
